<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <link href="css/bootstrap.min.css" rel="stylesheet">
  <script src="js/bootstrap.min.js" ></script>
</head>
<body>
<form class="form-horizontal"   th:action="@{/save}"  method="post">
  <!-- 表单内容-->
  <div class="form-group">
    <label for="userName" class="col-sm-2 control-label">userName</label>
    <div class="col-sm-10">
      <input type="text" class="form-control" name="username"  id="userName" placeholder="请输入用户名"/>
    </div>
  </div>
  <div class="form-group">
    <label for="password" class="col-sm-2 control-label" >passWord</label>
    <div class="col-sm-10">
      <input type="password" class="form-control" name="password" id="passWord" placeholder="请输入密码"/>
    </div>
  </div>
  <div class="form-group">
    <label for="age" class="col-sm-2 control-label" >age</label>
    <div class="col-sm-10">
      <input type="text" class="form-control" name="age" id="age" placeholder="请输入年龄"/>
    </div>
  </div>
  <!-- 错误信息展示区-->
  <div class="form-group">
    <label  class="col-sm-2 control-label"></label>
    <div class="col-sm-10">
      <div th:if="${errorMsg != null}"  class="alert alert-danger" role="alert" th:text="${errorMsg}">
      </div>
    </div>
  </div>
  <!-- 按钮区-->
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <input type="submit" value="添加" class="btn btn-info" />
      &nbsp; &nbsp; &nbsp;
      <input type="reset" value="重置" class="btn btn-info" />
      &nbsp; &nbsp; &nbsp;
      <a href="/toAdd" th:href="@{/list}" class="btn btn-info">返回列表</a>
    </div>
  </div>
</form>

</body>
</html>